home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 126 < prev    next >
Encoding:
Text File  |  1996-08-06  |  3.4 KB  |  74 lines

  1. Newsgroups: comp.std.c++
  2. Path: cs.mu.OZ.AU!bounce-back
  3. From: thp@cs.ucr.edu (Tom Payne)
  4. Subject: Re: Throwing an exception from within a si
  5. Message-ID: <4e35jg$k8c@galaxy.ucr.edu>
  6. Originator: fjh@munta.cs.mu.OZ.AU
  7. Sender: news@cs.mu.OZ.AU (CS-Usenet)
  8. Organization: University of California, Riverside Department of Computer Science
  9. X-Newsreader: TIN [UNIX 1.3 950824BETA PL0]
  10. References: <4du0gr$8k8@galaxy.ucr.edu> <4e0moi$4dp@engnews1.Eng.Sun.COM>
  11. X-Original-Date: 23 Jan 1996 17: 24:00 GMT
  12. Date: Wed, 24 Jan 1996 00:53:05 GMT
  13. Approved: fjh@cs.mu.oz.au
  14. X-Auth: PGPMoose V1.1 PGP comp.std.c++
  15.     iQBFAgUBMQWDWOEDnX0m9pzZAQFbOwGAgi05D/Jr41NlUPGRhUgkfFqiipvQWioL
  16.     HErprzvI2M8uPvy3IunN5EmGoBDzHbux
  17.     =xzLK
  18.  
  19. Steve Clamage (clamage@Eng.Sun.COM) wrote:
  20. : In article 8k8@galaxy.ucr.edu, thp@cs.ucr.edu (Tom Payne) writes:
  21. : >Steve Clamage (clamage@Eng.Sun.COM) wrote:
  22. : >: 
  23. : >: What we put in the language standard is binding on all implementations.
  24. : >: We try to specify things that can be implemented efficiently on any
  25. : >: likely system. In addition, we try to specify features so that they have
  26. : >: no cost (or nearly no cost) if you don't use them.
  27. : >
  28. : >Agreed!!
  29. : >
  30. > >: IMHO, guarantees about what you
  31. : >: can do in an asynchronous signal handler don't meet those criteria for
  32. : >: inclusion in the C++ standard.
  33. : >
  34. : >That's a rather broad conclusion, given the discussion so far.
  35. [...]
  36. : C++, on the other hand, is intended to be dropped into (nearly) any existing
  37. : platform and coexist with other languages on that platform. The language
  38. : definition attempts to stay away from areas where common platforms have
  39. : widely differing behavior for that reason. Asynchronous signal handling
  40. : certainly varies widely among platforms.
  41.  
  42. There are certain core semantic features common to signal hanling in
  43. all platforms, and IMHO we are not going outside them.  If a platform
  44. support signals, all we need is a way to block (i.e., defer) them.
  45.  
  46. If the ABI implementation of signal blocking is missing or has high
  47. overhead, then we can use global flags inside the program to reduce
  48. blocking to setting a bit and reduce unblocking to clearing that bit
  49. and checking whether a deferred signal has arrived (in which case
  50. there is additional overhead to check which signal to process it).  We
  51. can omit the handling of the blockage bit and instead use PC-range
  52. techniques to check, on signal arrival, whether the flag would have
  53. been set.  (David Chase has outline a more radical approach that
  54. avoids the need to check the deferred-signal bit.)  In any case, we
  55. are not counting on the ABI to have an efficient implementation of
  56. signal blocking.
  57.  
  58. : It's easy to wave your hands and say that the implementation ought to
  59. : be relatively easy to do and not overly expensive. But what if the ABI
  60. : on a common platform makes that infeasible? If a language feature
  61. : limits the number of platforms which allow implementation, it should be
  62. : important to a wide range of programmers and programs.
  63.  
  64. Agreed!!  Note however that an increasing percentage of programs have
  65. asynchornous aspects to them, under headings such as "event-driven",
  66. "real-time", "multi-threaded", "parallel", "concurrent", etc.  
  67.  
  68. Tom Payne (thp@cs.ucr.edu)
  69. ---
  70. [ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  71.   Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy
  72.   is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
  73.